package com.parachutes.aspsystemapi.feign;

import com.parachutes.aspsystemapi.domian.Result;
import com.parachutes.aspsystemapi.domian.UserInterfaceSubscribe;
import feign.hystrix.FallbackFactory;

public class UserInterfaceSubscribeFallback implements FallbackFactory<UserInterfaceSubscribeFeign> {
    @Override
    public UserInterfaceSubscribeFeign create(Throwable throwable) {
        return new UserInterfaceSubscribeFeign() {

            @Override
            public Result<Boolean> updateSubscribed(UserInterfaceSubscribe userInterfaceSubscribe) {
                return Result.of(false, "Failed to update subscribed", null);
            }
        };
    }
}
